export function generateAdditionCombined(difficulty: 1 | 2 = 1): {
  content: string;
  solution: string;
  difficulty: number;
  knowledge_code: string;
  question_type: string;
} {
  // 难度1: 三个数的简单组合
  // 难度2: 四个数的复杂组合
  
  if (difficulty === 1) {
    const a = Math.floor(Math.random() * 90) + 10;
    const b = Math.floor(Math.random() * 90) + 10;
    const c = 100 - b; // 确保b+c=100
    return {
      content: `${a}+${b}+${c}`,
      solution: `${a}+${b}+${c} = ${b}+${c}+${a} = (${b}+${c})+${a} = 100+${a} = ${100 + a}`,
      difficulty,
      knowledge_code: '3.1.3_jiafa-yunsuanlü-de-yingyong',
      question_type: 'fill_in_blank'
    };
  } else {
    const a = Math.floor(Math.random() * 90) + 10;
    const b = Math.floor(Math.random() * 90) + 10;
    const c = 100 - b;
    const d = Math.floor(Math.random() * 90) + 10;
    const e = 100 - d;
    return {
      content: `${a}+${b}+${c}+${d}+${e}`,
      solution: `${a}+${b}+${c}+${d}+${e} = ${a}+(${b}+${c})+(${d}+${e}) = ${a}+100+100 = ${a + 200}`,
      difficulty,
      knowledge_code: '3.1.3_jiafa-yunsuanlü-de-yingyong',
      question_type: 'fill_in_blank'
    };
  }
}